//
//  ToReFreshTableViewController.m
//  BaseTools
//
//  Created by 李挺哲 on 15/8/19.
//  Copyright (c) 2015年 ltz. All rights reserved.
//

#import "ToReFreshTableViewController.h"
#import "PullToRefreshViewController.h"
#import "WebViewViewController.h"
@interface ToReFreshTableViewController ()

@end

@implementation ToReFreshTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
    
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
       PullToRefreshViewController *viewController= [self.storyboard instantiateViewControllerWithIdentifier:@"PullToRefreshViewController"];

    
    
    if (indexPath.row==0) {
        viewController.type=1;
        [self.navigationController pushViewController:viewController animated:YES];
    }
    else if(indexPath.row==1){
    viewController.type=2;
        [self.navigationController pushViewController:viewController animated:YES];
    }
    else if(indexPath.row==2){
        viewController.type=3;
        [self.navigationController pushViewController:viewController animated:YES];
    }
    else if(indexPath.row==3){
        
        WebViewViewController *webViewController= [self.storyboard instantiateViewControllerWithIdentifier:@"WebViewViewController"];
        webViewController.url=@"http://www.baidu.com";
        [self.navigationController showViewController:webViewController sender:self ];

        
    }
    
    
    
}

@end
